package com.yinhd.study.designPatterns.Interviewer.course;

/**
 * @program: study
 * @description:
 * @Author: chengl
 * @create: 2022-02-08 10:35
 **/
public class Visitor implements IVisitor{
    @Override
    public void visit(FreeCourse freeCourse) {
        System.out.println("免费课程"+freeCourse.getName());
    }

    @Override
    public void visit(PracticeCourse practiceCourse) {
        System.out.println("实战课程"+practiceCourse.getName()+" 价格"+practiceCourse.getPrice());
    }
}
